﻿using System;
using System.Windows;
using jSLApp.Client.ApplicationBase;
using jSLApp.Client.MainService;
using jSLCore.Client.Presentation.BaseControl.Selection;

namespace jSLApp.Client.Controls
{
    public partial class TopicGrid : jSLGrid
    {
        public TopicGrid()
        {
            InitializeComponent();

            Style = (Style)Resources["selGrid"];
        }


        private void goDetails_Clicked(object sender, RowSelectedEventArgs e)
        {
            var commentable = (Commentable)e.RowObject;
            var commentableType = commentable.TypeEnum;


            var id = commentable.id;

            MainContentContainer.Current.GoCommentable(commentableType, id);
        }
    }
}
